package com.tidc.consumer9001.fallback;

import com.tidc.consumer9001.api.ProviderApi;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @ClassNmae TestFallbaskFactory
 * @Description TODO 服务降级和熔断处理
 * @Author 14631
 **/
@Component
public class ApiFallbaskFactory implements FallbackFactory<ProviderApi> {


	@Override
	public ProviderApi create(Throwable throwable) {
		return new ProviderApi() {
			@Override
			public String get(int id) {
				return "11111";
			}
		};
	}
}
